// 引入app类型
import { App } from 'vue'

// 引入element-plus的样式
import 'element-plus/lib/theme-chalk/base.css'

// 按需引入对应element的组件
import {
  ElForm,
  ElFormItem,
  ElButton,
  ElInput,
  ElTabs,
  ElTabPane,
  ElCheckbox,
  ElLink
} from 'element-plus'

const components = [
  ElForm,
  ElFormItem,
  ElButton,
  ElInput,
  ElTabs,
  ElTabPane,
  ElCheckbox,
  ElLink
]

export default function (app: App): void {
  //批量注册组件
  for (const component of components) {
    app.component(component.name, component)
  }
}
